#include <iostream>
#include <array>
#include <string>
void practice8();
void practice10();

struct pizza
{
	std::string Companyname;
	int diameter;
	int weight;
};

//int main()
//{
//	practice10();
//	return 0;
//}

void practice8()
{
	using namespace std;
	pizza *ps = new pizza;
	cout << "Please write the diameter: ";
	cin >> ps->diameter;
	cout << "Please write the Companyname: ";
	cin.get();
    getline(cin, ps->Companyname);           //string style
	cout << "Please write the weight: ";
	cin >> ps->weight;
	cout << "the data of pizza: " << endl;
	cout << (*ps).Companyname << " "<<(*ps).diameter << " " << (*ps).weight<<endl;
	delete ps;
	return;
}

void practice10()
{
	using namespace std;
	array<double, 3>run_grade;
	double q{0};
	for(int i=0 ; i<3 ; i++)
		cin >> run_grade[i];
	for (int i = 0; i < 3; i++)
	{
		cout << run_grade[i] << endl;
		q += run_grade[i];
	}
	q = q / 3;
	cout << "avr: " << q;
	return;
}